
<div class="widget blue">
    <div class="widget-title">
        <h4><i class="icon-list"></i>Encuestas</h4>
        <span class="tools">
            <a href="javascript:;" class="icon-chevron-down"></a>
            <!--a href="javascript:;" class="icon-remove"></a-->
        </span>
    </div>
    <div class="widget-body">
        <?php
        $this->widget('bootstrap.widgets.TbGridView', array(
            'id' => 'form-grid',
            'type' => 'striped bordered hover advance',
            'dataProvider' => NoseyEntidadAnswer::model()->searchByContacto($model->id),
            'columns' => array(
                array(
                    'header' => 'Formulario',
                    'name' => 'nosey_form_id',
                    'value' => '$data->form->name',
                ),
                array(
                    'header' => 'Fecha',
                    'value' => '$data->answers->creation_date',
                ),
                array(
                    'class' => 'CButtonColumn',
                    'template' => '{view}',
                    'buttons' => array(
                        'view' => array(
                            'label' => '<button class="btn btn-success"><i class="icon-eye-open"></i></button>',
                            'options' => array('title' => 'Ver'),
                            'imageUrl' => false,
                            'url' => '$data->id',
                            'click' => 'function() {js:viewModal("nosey/default/respuestasFormulario/id/"+$(this).attr("href"),function(){}); return false;}',
                        ),
                    ),
                    'htmlOptions' => array(
                        'width' => '80'
                    )
                ),
            ),
        ));
        ?>
    </div>
</div>